/*
 * @Author: bugdr 
 * @Date: 2021-08-Th 09:19:33 
 * @Last Modified by:   bugdr 
 * @Last Modified time: 2021-08-Th 09:19:33 
 */
<template>
  <ul class="todo-main">
    <transition-group name="todo" appear>
      <Item
        v-for="item in todos"
        :key="item.id"
        :todo="item"
        :checkTodo="checkTodo"
        :deleteTodo="deleteTodo"
      />
    </transition-group>
  </ul>
</template>

<script>
import Item from "./Item";
export default {
  name: "List",
  data() {
    return {};
  },
  components: {
    Item,
  },
  props: ["todos", "checkTodo", "deleteTodo"],
};
</script>

<style scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}

.todo-enter-active {
  animation: bug 1s;
}
.todo-leave-active {
  animation: bug 1s reverse;
}

@keyframes bug {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0px);
  }
}
</style>